#pragma once

using namespace System;
using namespace System::Data;
using namespace System::Diagnostics;
using namespace System::Collections;

using namespace MySql::Data;
using namespace MySql::Data::MySqlClient;

namespace CLRDB
{
	ref class MySQLDBManager
	{
	public:
		MySQLDBManager(void);

		static MySQLDBManager^ g_Instance = nullptr;
		static MySQLDBManager^ GetInstance();

		static DataSet^ GetDataXMLDataSet();

	private:
		System::String^ m_ConnectionString;
		MySql::Data::MySqlClient::MySqlConnection^ m_Connection;

	public:
		bool Initialize( String^ connectionString );

	public:
		bool TruncateTable( System::String^ table_name );
		bool GetTableColumns( System::String^ table_name, ArrayList^ listColumns );
		bool InsertData( String^ tableName, DataSet^ dataSet, String^ error );
	};
}